package com.sunlg.smarthome.base;

import android.app.Application;

import com.sunlg.smarthome.data.remote.SHServiceWrapper;
import com.sunlg.smarthome.utils.JPushUtils;
import com.sunlg.smarthome.utils.PreferHelper;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by sunlg on 2017/2/22.
 */

public class App extends Application{
    private static App instance;
    private static PreferHelper preferHelper;
    private static SHServiceWrapper serviceWrapper;

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        preferHelper = new PreferHelper();
        serviceWrapper = new SHServiceWrapper();

        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);
        new JPushUtils().setTag("android");
    }

    public static App getInstance(){
        return instance;
    }

    public PreferHelper getPreferHelper(){
        return preferHelper;
    }

    public SHServiceWrapper getServiceWrapper(){
        return serviceWrapper;
    }

}
